package com.liu.lsm.livestock.service.impl;

import com.liu.lsm.livestock.entity.History;
import com.liu.lsm.livestock.mapper.HistoryMapper;
import com.liu.lsm.livestock.service.HistoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class HistoryServiceImpl implements HistoryService {

    @Resource
    HistoryMapper historyMapper;

    @Override
    public void deleteById(Integer id) {
        historyMapper.deleteById(id);
    }

    @Override
    public void insertById(History history) {
        historyMapper.insertById(history);
    }

    @Override
    public List<History> selectById(Integer livestockId) {
        return historyMapper.selectById(livestockId);
    }

    @Override
    public List<History> listAll(History history) {
        return historyMapper.listAll(history);
    }

    @Override
    public void updateById(History history) {
        historyMapper.updateById(history);
    }
}

